Class JoinThread<T extends java.io.Serializable & java.lang.Comparable<T>>

  • All Implemented Interfaces:
    java.lang.Runnable

    public class JoinThread<T extends java.io.Serializable & java.lang.Comparable<T>>
    extends GraphicThread
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      JoinThread​(MyPane _pane)
      konstruktor, pradi pane
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()
      spustac threadu zavola funkciu threadJoin ktora spaja korene stromov ak sa koren druheho nenachadza v prvom skusi to naopak po skonceni vypise hotovo vykresli finalny strom1
      boolean threadJoin​(Node<T> node, Node<T> find)
      prerobena funkcia Ostatne.Node.Join hlada ci sa find nachadza v podstrome node ak ho najde pridava pomocou prisposobenej funkcie add ak nie vracia false
      • Methods inherited from class java.lang.Thread

        activeCount, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, checkAccess, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • JoinThread

        public JoinThread​(MyPane _pane)
        konstruktor, pradi pane
        Parameters:
        _pane -
    • Method Detail

      • run

        public void run()
        spustac threadu zavola funkciu threadJoin ktora spaja korene stromov ak sa koren druheho nenachadza v prvom skusi to naopak po skonceni vypise hotovo vykresli finalny strom1
        Specified by:
        run in interface java.lang.Runnable
        Specified by:
        run in class GraphicThread
      • threadJoin

        public boolean threadJoin​(Node<T> node,
                                  Node<T> find)
        prerobena funkcia Ostatne.Node.Join hlada ci sa find nachadza v podstrome node ak ho najde pridava pomocou prisposobenej funkcie add ak nie vracia false
        Parameters:
        find - koren ktory sa pridava
        node - koren do ktoreho sa pridava
        Returns:
        skusi pridat find do node, ak sa podari vrati true inac false